﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace Conqueror.WP.Utility
{
    public static class PlayerColors
    {
        public static readonly Brush Unknown = new SolidColorBrush(new Color() { A = 128, R = 128, G = 128, B = 128 });
        public static readonly Brush Won = new SolidColorBrush(new Color() { A = 255, R = 216, G = 139, B = 0 });
        public static readonly Brush Playing = new SolidColorBrush(new Color() { A = 255, R = 240, G = 163, B = 10 });
        public static readonly Brush Ready = new SolidColorBrush(new Color() { A = 255, R = 96, G = 169, B = 23 });
        public static readonly Brush Waiting = new SolidColorBrush(new Color() { A = 196, R = 196, G = 196, B = 196 });
        public static readonly Brush Lost = new SolidColorBrush(new Color() { A = 255, R = 229, G = 20, B = 0 });

        public static Brush GetBrush(API.GamePlayerState state)
        {
            switch (state)
            {
                default:
                case API.GamePlayerState.Playing:
                    return PlayerColors.Playing;
                case API.GamePlayerState.Ready:
                    return PlayerColors.Ready;
                case API.GamePlayerState.Waiting:
                    return PlayerColors.Waiting;
                case API.GamePlayerState.Lost:
                    return PlayerColors.Lost;
                case API.GamePlayerState.Won:
                    return PlayerColors.Won;
                case API.GamePlayerState.Unknown:
                    return PlayerColors.Unknown;
            }
        }
    }
}
